package com.structure.map;

import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;

public class TreeMapTest {

//	static Map<String,String> map = new ConcurrentHashMap<String,String>();
//	static Map<String,String> map = new TreeMap<String,String>();
	static Map<String,String> map = new ConcurrentSkipListMap<String,String>();
	
	public static void main(String[] args){
		createMap();
	  for (Map.Entry<String, String> entry : map.entrySet()) {
		   System.out.println("key= " + entry.getKey() + " and value= " + entry.getValue());
	  }
	}
	
/*	key= 1 and value= test
			key= 2 and value= test
			key= ad0 and value= a
			key= ad2 and value= b
			key= ad3 and value= c
			key= ad_weather and value= d*/
	public static void createMap(){
		map.put("0", "test");
		map.put("2", "test");
		map.put("ad0", "a");
		map.put("ad2", "b");
		map.put("ad11", "c");
		map.put("ad_weather", "d");
	}
}
